import React from "react"

class Water extends React.PureComponent{
   
    state={
        msg:"宿舍关门了，要不我们去住宾馆吧！",
        girl:{
            name:"韩梅梅",
            age:35,
            height:170
        }
    }
click=()=>{
    this.setState({
        msg:"不行，你就是觊觎我的美色，臭不要脸的",
        girl:{
            name:"春花",
            age:34,
            height:169
        }
    })
}
    
    render() {
        console.log("render执行了")
        return (
            <fieldset>
                <legend>纯净组件</legend>
                <h1>{this.state.msg}</h1>
                <h1>女中豪杰姓名：{this.state.girl.name}</h1>
                <button onClick={this.click}>点击</button>
            </fieldset>
        )
    }
}
export default Water